package cc.mvpexample.activity;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.util.Log;

import javax.inject.Inject;

import cc.mvpexample.R;
import cc.mvpexample.core.CCApplication;
import cc.mvpexample.core.CCApplicationModule;
import cc.mvpexample.core.MainModule;
import cc.mvpexample.presenter.ImpMainPresenter;

public class MainActivity extends Activity {

    CCApplication application;

    @CCApplicationModule.RootApplication
    CCApplication app;

    @Inject
    ImpMainPresenter iMainPresenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        application = (CCApplication)getApplication();
        application.plusModule(new MainModule(this)).inject(this);

//        if (iMainPresenter.impMainView != null) {
//            Log.e("33", "333333");
//        }

        iMainPresenter.impMainView.run();
    }
}